All Questions
Tagged with clean-architecturehexagonal-architecture
10 questions
0votes
1answer
386views
How choose between Clean Arch and Hexagonal Arch(Ports And Adapters)?
I'm studying architecture patterns and I don't understand which type of scenario is more preferable to use clean architecture or hexagonal architecture. Is there something like that? For example, &...
7votes
2answers
8kviews
Key difference between Hexagonal Architecture vs Clean Architecture?
I am trying to improve the architecture for my React app project that has grown in size lately. I'm looking at Hexagonal architecture and Clean architecture, and I couldn't really see the difference ...
3votes
1answer
3kviews
In Clean Architecture, how do we name UseCases that get more and more specific without the names becoming too long?
All the examples of Clean Architecture that I see have very simple use cases, such as: OpenAccountUseCase DepositMoneyUseCase However, real world applications have much more complex logic. Let's say ...
2votes
2answers
2kviews
Help implementing call to external API and store summary in my database in hexagonal architecture with DDD
Good afternoon. My situation is this: I have to call an external API to create some data and store it there, but I want to have a summary of that data in my own database. I have my use case that ...
1vote
2answers
375views
Where to save entity metadata in a Ports-And-Adapters Architecture
I’m using a hexagonal/clean/ports-and-adapter architecture. For the sake of simplicity, I’ll only talk about domain and infrastructure here, where the infrastructure has dependencies on the domain but ...
0votes
2answers
233views
May the left-side know the right-side when using CQRS with Hexagonal?
I'm trying to use the hexagonal architecture but I want the flexibility to make CUSTOM queries right to the database (or cache) to populate DTOs right from the left-side without passing through the ...
1vote
2answers
743views
Catch "foreign" exception in adapter and convert them in own business exception is a good practice?
I am currently thinking about some design choices regarding exception handling. My current architecture looks a little like this: You can see that I have a UI where a try-catch middleware is cathing ...
5votes
2answers
1kviews
Hexagonal/Clean Architecture - threads, locks, synchronization
All the examples across the internet try to pretend that every application is run on a single thread. There is no problem with synchronization, multithreading etc. Uncle Bob, in his "Clean ...
0votes
2answers
4kviews
How to handle different types of errors in Clean Architecture?
So, in the process of creating a user there are 4 possible outcomes: Username is already taken Email is already taken Username is invalid Email is invalid Here is what I have in the controller for ...
-3votes
1answer
66views
In which layer should a `MailerInterface` be?
Speaking about DDD, in which layer should a hypothetical MailerInterface be? I know the implementation (or adapters) for each specific mail sender package should be in the infrastructure, but these ...